/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package sysmodel.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import sysmodel.RestServiceParameter;
import sysmodel.SysmodelPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Rest Service Parameter</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link sysmodel.impl.RestServiceParameterImpl#getPathParam <em>Path Param</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class RestServiceParameterImpl extends ServiceParameterImpl implements RestServiceParameter {
	/**
	 * The default value of the '{@link #getPathParam() <em>Path Param</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPathParam()
	 * @generated
	 * @ordered
	 */
	protected static final String PATH_PARAM_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPathParam() <em>Path Param</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPathParam()
	 * @generated
	 * @ordered
	 */
	protected String pathParam = PATH_PARAM_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected RestServiceParameterImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return SysmodelPackage.Literals.REST_SERVICE_PARAMETER;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPathParam() {
		return pathParam;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPathParam(String newPathParam) {
		String oldPathParam = pathParam;
		pathParam = newPathParam;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SysmodelPackage.REST_SERVICE_PARAMETER__PATH_PARAM, oldPathParam, pathParam));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case SysmodelPackage.REST_SERVICE_PARAMETER__PATH_PARAM:
				return getPathParam();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case SysmodelPackage.REST_SERVICE_PARAMETER__PATH_PARAM:
				setPathParam((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case SysmodelPackage.REST_SERVICE_PARAMETER__PATH_PARAM:
				setPathParam(PATH_PARAM_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case SysmodelPackage.REST_SERVICE_PARAMETER__PATH_PARAM:
				return PATH_PARAM_EDEFAULT == null ? pathParam != null : !PATH_PARAM_EDEFAULT.equals(pathParam);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (pathParam: ");
		result.append(pathParam);
		result.append(')');
		return result.toString();
	}

} //RestServiceParameterImpl
